Optimal. Leaf size=114 \[ \frac{6 i c^4}{f \left (a^3+i a^3 \tan (e+f x)\right )}-\frac{i c^4 \log (\cos (e+f x))}{a^3 f}-\frac{c^4 x}{a^3}-\frac{6 i c^4}{a f (a+i a \tan (e+f x))^2}+\frac{8 i c^4}{3 f (a+i a \tan (e+f x))^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.133208, antiderivative size = 114, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.097, Rules used = {3522, 3487, 43} \[ \frac{6 i c^4}{f \left (a^3+i a^3 \tan (e+f x)\right )}-\frac{i c^4 \log (\cos (e+f x))}{a^3 f}-\frac{c^4 x}{a^3}-\frac{6 i c^4}{a f (a+i a \tan (e+f x))^2}+\frac{8 i c^4}{3 f (a+i a \tan (e+f x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3522
Rule 3487
Rule 43
Rubi steps
\begin{align*} \int \frac{(c-i c \tan (e+f x))^4}{(a+i a \tan (e+f x))^3} \, dx &=\left (a^4 c^4\right ) \int \frac{\sec ^8(e+f x)}{(a+i a \tan (e+f x))^7} \, dx\\ &=-\frac{\left (i c^4\right ) \operatorname{Subst}\left (\int \frac{(a-x)^3}{(a+x)^4} \, dx,x,i a \tan (e+f x)\right )}{a^3 f}\\ &=-\frac{\left (i c^4\right ) \operatorname{Subst}\left (\int \left (\frac{1}{-a-x}+\frac{8 a^3}{(a+x)^4}-\frac{12 a^2}{(a+x)^3}+\frac{6 a}{(a+x)^2}\right ) \, dx,x,i a \tan (e+f x)\right )}{a^3 f}\\ &=-\frac{c^4 x}{a^3}-\frac{i c^4 \log (\cos (e+f x))}{a^3 f}+\frac{8 i c^4}{3 f (a+i a \tan (e+f x))^3}-\frac{6 i c^4}{a f (a+i a \tan (e+f x))^2}+\frac{6 i c^4}{f \left (a^3+i a^3 \tan (e+f x)\right )}\\ \end{align*}
Mathematica [A] time = 1.58133, size = 121, normalized size = 1.06 \[ \frac{c^4 \sec ^3(e+f x) (-9 i \sin (e+f x)+6 f x \sin (3 (e+f x))+2 i \sin (3 (e+f x))-3 \cos (e+f x)+\cos (3 (e+f x)) (6 \log (\cos (e+f x))-6 i f x-2)+6 i \sin (3 (e+f x)) \log (\cos (e+f x)))}{6 a^3 f (\tan (e+f x)-i)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.031, size = 91, normalized size = 0.8 \begin{align*} -{\frac{8\,{c}^{4}}{3\,f{a}^{3} \left ( \tan \left ( fx+e \right ) -i \right ) ^{3}}}+{\frac{i{c}^{4}\ln \left ( \tan \left ( fx+e \right ) -i \right ) }{f{a}^{3}}}+6\,{\frac{{c}^{4}}{f{a}^{3} \left ( \tan \left ( fx+e \right ) -i \right ) }}+{\frac{6\,i{c}^{4}}{f{a}^{3} \left ( \tan \left ( fx+e \right ) -i \right ) ^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.4894, size = 266, normalized size = 2.33 \begin{align*} -\frac{{\left (12 \, c^{4} f x e^{\left (6 i \, f x + 6 i \, e\right )} + 6 i \, c^{4} e^{\left (6 i \, f x + 6 i \, e\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right ) - 6 i \, c^{4} e^{\left (4 i \, f x + 4 i \, e\right )} + 3 i \, c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} - 2 i \, c^{4}\right )} e^{\left (-6 i \, f x - 6 i \, e\right )}}{6 \, a^{3} f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 7.78101, size = 158, normalized size = 1.39 \begin{align*} - \frac{i c^{4} \log{\left (e^{2 i f x} + e^{- 2 i e} \right )}}{a^{3} f} - \frac{\left (\begin{cases} 2 c^{4} x e^{6 i e} - \frac{i c^{4} e^{4 i e} e^{- 2 i f x}}{f} + \frac{i c^{4} e^{2 i e} e^{- 4 i f x}}{2 f} - \frac{i c^{4} e^{- 6 i f x}}{3 f} & \text{for}\: f \neq 0 \\x \left (2 c^{4} e^{6 i e} - 2 c^{4} e^{4 i e} + 2 c^{4} e^{2 i e} - 2 c^{4}\right ) & \text{otherwise} \end{cases}\right ) e^{- 6 i e}}{a^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.57987, size = 263, normalized size = 2.31 \begin{align*} -\frac{-\frac{60 i \, c^{4} \log \left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - i\right )}{a^{3}} + \frac{30 i \, c^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1 \right |}\right )}{a^{3}} + \frac{30 i \, c^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1 \right |}\right )}{a^{3}} + \frac{147 i \, c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{6} + 1002 \, c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{5} - 2445 i \, c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 3820 \, c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 2445 i \, c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 1002 \, c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 147 i \, c^{4}}{a^{3}{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - i\right )}^{6}}}{30 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]